package com.gitee.aurora.server.service.impl;

import com.gitee.aurora.server.dao.SjjcLogInfoDao;
import com.gitee.aurora.comm.Constant;
import com.gitee.aurora.server.vo.SjjcLogInfo;
import com.gitee.aurora.server.service.SjjcLogInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SjjcLogInfoServiceImpl implements SjjcLogInfoService {

    @Autowired
    private SjjcLogInfoDao sjjcLogInfoDao;
    @Override
    public List<SjjcLogInfo> querySjjcLogInfo(SjjcLogInfo sjjcLogInfo) throws Exception {
        List<SjjcLogInfo> sjjcLogInfoList = sjjcLogInfoDao.querySjjcLogInfo(sjjcLogInfo);
        if(sjjcLogInfoList.size()==0){
            sjjcLogInfo.setStatus(Constant.lstatus);
            sjjcLogInfoList.add(sjjcLogInfo);
        }
        return sjjcLogInfoList;
    }


    @Override
    public int insertSjjcLogInfo(SjjcLogInfo sjjcLogInfo) {
        return sjjcLogInfoDao.insertSjjcLogInfo(sjjcLogInfo);
    }
}
